class Animal(object):
    def __init__(self, name):
        self.name = name

    def eat(self):
        print(f'---{self.name}吃---')

    def run(self):
        print(f'---{self.name}跑---')

    def sleep(self):
        print(f'---{self.name}睡---')


class Dog(Animal):
    def __init__(self, name, zhong):
        super().__init__(name)
        self.zhong = zhong

    def bark(self):
        print(f'---{self.name}叫-忠诚度{self.zhong}---')


class Cat(Animal):
    def catch(self):
        print(f'---{self.name}抓老鼠---')


class Xiaotainquan(Dog):
    def fly(self):
        print(f'---{self.name}飞---')
a = Animal("动物")
a.run()

ahuang= Dog('阿黄',75)
ahuang.sleep()
ahuang.bark()


xiaotian = Xiaotainquan('哮天犬',100)
xiaotian.fly()
xiaotian.eat()
xiaotian.run()
xiaotian.bark()
xiaotian.sleep()

